﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Reflection;
using System.IO;

namespace PPFinance.Common
{
    public class ObjectAction
    {
        //public static object Clone(object Obj)
        //{
        //    if (Obj == null) return null;
        //    object newObj;
        //    Type T = Obj.GetType();
        //    newObj = Activator.CreateInstance(T);
        //    PropertyInfo[] Properties = T.GetProperties(); PropertyInfo P;
        //    for (int i = 0; i < Properties.Length; i++)
        //    {
        //        P = Properties[i];
        //        if (!P.CanRead) continue;  //The property must be readable and writable.
        //        if (P.CanWrite)
        //        {
        //            if (P.PropertyType.GetInterface("ICloneable", true) != null)
        //            {
        //                ICloneable objIClone = P.GetValue(Obj, null) as ICloneable;
        //                P.SetValue(newObj, objIClone.Clone(), null);
        //            }
        //            else
        //            {
        //                P.SetValue(newObj, P.GetValue(Obj, null), null);
        //            }
        //        }
        //        //这种情况也写了些代码，不过不够完善就不发了
        //        else if (P.PropertyType.GetInterface("ICollection", true) != null)
        //        {
        //        }
        //    }
        //    return newObj;
        //}


    }
}
